package com.example.cm_player

import com.example.cm_player.model.PlayMode
import com.example.cm_player.model.SongInfo

interface IMusicPlayer {
    // 播放控制
    fun play(songInfo: SongInfo)
    fun start()
    fun pause()
    fun resume()
    fun stop()
    fun seekTo(position: Long)
    fun setVolume(volume: Float)


    // 播放列表操作
    fun previousMusic()
    fun nextMusic()
    fun addToPlaylist(songInfo: SongInfo)
    fun removeFromPlaylist(songInfo: SongInfo)
    fun addNewPlayList(newList:List<SongInfo>)
    fun clearMusicPlayList()
    fun getCurrentMusicList():List<SongInfo>

    //模式获取与设置
    fun setPlayMode(playMode: PlayMode)
    fun getPlayMode(): PlayMode

    // 生命周期
    fun release()
}